#!/usr/bin/env groovy

def call(robot_id,tag) {
  Boolean robot_all = params.ROBOT_ATALL

  // if (robot_all == null ) {
  //   Boolean robot_all_new = false
  // } else {
  //   Boolean robot_all_new = params.ROBOT_ATALL
  // }

  dingtalk (
          robot: "${robot_id}",
          type: 'MARKDOWN',
          atAll: "${robot_all}",
          title: "JENKINS JOB:${job_name}",
          text: [
                  "- Jenkins_job：<font color='#00A600' face='KaiTi'>${job_name}</font>\n - Tag：<font color='#F00078' face='KaiTi'>${tag}</font>\n - 发布说明：${params.NOTE}\n"
          ]
  )
}
